import { dealOpts, LINK } from './../api_type'
import request from '@/util/request'

// 公告
const linkCreateNotice = (params, opts) => {
  return request.post(dealOpts(LINK + '/createNotice', opts), params)
}

const linkGetNoticeInfo = (params, opts) => {
  return request.get(dealOpts(LINK + '/getNoticeInfo', opts), params)
}

const linkModifyNotice = (params, opts) => {
  return request.post(dealOpts(LINK + '/modifyNotice', opts), params)
}

const linkGetNotices = (params, opts) => {
  return request.get(dealOpts(LINK + '/getNotices', opts), params)
}

const linkDeleteNotice = (params, opts) => {
  return request.get(dealOpts(LINK + '/deleteNotice', opts), params)
}

export default {
  // 公告
  linkCreateNotice,
  linkModifyNotice,
  linkGetNoticeInfo,
  linkGetNotices,
  linkDeleteNotice
}
